package com.chinacoal.microservice.fallback;

import com.chinacoal.microservice.ContractManagementClient;
import com.chinacoal.microservice.pojo.CcmsSmartleasingAuditRecods;
import com.chinacoal.microservice.pojo.CcmsSmartleasingContract;
import com.chinacoal.microservice.util.CodeMsg;
import com.chinacoal.microservice.util.QueryCriteria;
import com.chinacoal.microservice.util.Result;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 运维管理-合同管理-异常回退类
 * @date 2020-11-16 9：40
 */
@Component
public class ContractManagementClientFallback implements ContractManagementClient {

    /**
     * @Description: 查询所有的合同信息（带分页），异常回退
     * @author zhuliang
     * @date 2020/11/16 10:15
     */
    @Override
    public Result<List<CcmsSmartleasingContract>> getAllContract(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 退租，异常回退
     * @author zhuliang
     * @date 2020/11/17 11:19
     */
    @Override
    public Result rentCancellation(CcmsSmartleasingContract contract, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 根据合同id查询合同信息,异常回退
     * @author zhuliang
     * @date 2020/11/17 13:57
     */
    @Override
    public Result<CcmsSmartleasingContract> getContractById(String pkContractId, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 修改合同信息和租户信息，异常回退
     * @author zhuliang
     * @date 2020/11/17 14:41
     */
    @Override
    public Result updateContract(CcmsSmartleasingContract contract, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 审核，异常回退
     * @author zhuliang
     * @date 2020/11/17 15:57
     */
    @Override
    public Result reviewContract(CcmsSmartleasingAuditRecods auditRecods, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 根据合同id批量删除合同信息，异常回退
     * @author zhuliang
     * @date 2020/11/17 16:54
     */
    @Override
    public Result deleteContract(String deleteId, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 条件查询合同信息（带分页），异常回退
     * @author zhuliang
     * @date 2020/11/18 10:37
     */
    @Override
    public Result<List<CcmsSmartleasingContract>> getContractByCondition(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 添加合同信息
     * @author zhuliang
     * @date 2020/11/18 14:11
     */
    @Override
    public Result addContract(CcmsSmartleasingContract contract, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }


}
